package com.qs.sckill.dao;

import com.qs.sckill.entity.SckillOrder;
import org.apache.ibatis.annotations.*;

@Mapper
public interface SckillOrderDao {

    @Select("select * from t_sckill_order where user_id=#{userId} and goods_id=#{goodsId}")
    SckillOrder getSckillOrderByUserIdAndGoodsId(String userId, String goodsId);


    @Insert("insert into t_sckill_order(id,user_id,order_id,goods_id) " +
            "values (#{id}, #{userId}, #{orderId}, #{goodsId}) ")
    void insertSckillOrder(SckillOrder sckillOrder);

    @Delete("delete from t_sckill_order")
    void deleteAllData();
}
